package com.orchard.orchardfarmmanagementsystem.service;


import com.orchard.orchardfarmmanagementsystem.dto.ResetPasswordDTO;
import com.orchard.orchardfarmmanagementsystem.dto.UserRoleDTO;
import com.orchard.orchardfarmmanagementsystem.entity.Role;
import com.orchard.orchardfarmmanagementsystem.entity.User;
import com.orchard.orchardfarmmanagementsystem.utils.Result;
import org.springframework.security.core.authority.SimpleGrantedAuthority;

import java.util.List;

public interface UserService {
  User findByUsername(String username);
  boolean authenticate(String username, String password);
  List<User> getAllUsers();

  List<UserRoleDTO> getAllUsersAndRole();

  List<Role> getAllRoles();

  void addUser(UserRoleDTO userRoleDTO);

  void editUser(Integer id, UserRoleDTO userRoleDTO);

  void deleteUser(Integer id);

  void resetPassword(Integer id, ResetPasswordDTO resetPasswordDTO);

  List<SimpleGrantedAuthority> loadUserAuthorities(Integer userId);

}